package com.qeegoo.b2bautozityp.moudle.good.view;

import com.qeegoo.b2bautozityp.R;
import com.qeegoo.b2bautozityp.databinding.FragGoodsPriceBinding;
import com.qeegoo.b2bautozityp.injector.component.DaggerGoodsFragmentComponent;
import com.qeegoo.b2bautozityp.moudle.base.BaseFragment;
import com.qeegoo.b2bautozityp.moudle.good.viewmodel.GoodsPriceViewModel;

import javax.inject.Inject;

/**
 * 王少岩 在 2017/9/14 创建了它
 */

public class GoodsPriceFragment extends BaseFragment<FragGoodsPriceBinding> {

    @Inject
    GoodsPriceViewModel mViewModel;

    public static GoodsPriceFragment newsIntance(){
        GoodsPriceFragment fragment = new GoodsPriceFragment();
        return fragment;
    }

    @Override
    protected int attachLayoutRes() {
        return R.layout.frag_goods_price;
    }

    @Override
    protected void initInjector() {
        DaggerGoodsFragmentComponent.builder().appComponent(getAppComponent()).fragmentComponent(getFragmentComponent()).build().inject(this);
    }

    @Override
    protected void initViews() {
        mBinding.setViewModel(mViewModel);
    }

    public GoodsPriceViewModel getViewModel(){
        return mViewModel;
    }
}
